package com.fita.wechat.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.fita.entity.data.Country;
import com.fita.entity.data.Supplier;
import com.fita.entity.data.VehicleParameter;
import com.fita.entity.order.Order;
import com.fita.entity.order.OrderVehicleFee;

/**
 * 
 * @author sjh
 *
 */
@Dao("hibernate")
public interface CarDao {
	
	/**
	 * list 国家
	 * @return
	 */
	@Query("FROM Country WHERE disabled = false")
	public List<Country> listCountry();
	
	/**
	 * list 品牌
	 * @return
	 */
	@Query("FROM Supplier WHERE disabled = false")
	public List<Supplier> listSupplier();
	
	/**
	 * 
	 * @param englishName
	 * @return
	 */
	@Query("FROM VehicleParameter WHERE disabled = false AND englishName = :englishName")
	public VehicleParameter loadParameter(@Variable("englishName") String englishName);
	
	/**
	 * 
	 * @param order
	 * @return
	 */
	@Query("FROM OrderVehicleFee WHERE disabled = false AND order = :order")
    public List<OrderVehicleFee> listOrderVehicleFee(@Variable("order") Order order);
	
}
